package com.hycat.mail.order.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author : lzhycat
 * @date : 2022-08-22 17:23
 */
@Data
@TableName("oms_order_account")
public class OrderAccount implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    private Long id;

    private String lock;

    private Date creatTime;

    private Date updateTime;

    public OrderAccount from(Long id, String lock) {
        OrderAccount orderAccount = new OrderAccount();
        orderAccount.setId(id);
        orderAccount.setLock(lock);
        orderAccount.setCreatTime(new Date());
        orderAccount.setUpdateTime(new Date());
        return orderAccount;
    }
}
